﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Practices.Unity;

using NUnit.Framework;

using ERPStore.Web.Html;

namespace ERPStore.Cart.Tests
{
	[TestFixture]
	public class RoutesTests : ERPStore.Tests.TestBase
	{
		public RoutesTests()
		{

		}

		[SetUp]
		public void Setup()
		{
			base.Initialize();
		}

		[Test]
		public void Cart_Href()
		{
			var ctrl = CreateController<ERPStore.Web.Cart.Controllers.CartController>();

			var url = ctrl.Url.CartHref();

			Assert.AreEqual(url, "/panier");
		}

		[Test]
		public void Cart_Status_Href()
		{
			var ctrl = CreateController<ERPStore.Web.Cart.Controllers.CartController>();

			var url = ctrl.Url.CartStatusHref();

			Assert.AreEqual(url, "/panier/statut");
		}

		[Test]
		public void Mini_Cart_Href()
		{
			var ctrl = CreateController<ERPStore.Web.Cart.Controllers.CartController>();

			var url = ctrl.Url.MiniCartHref();

			Assert.AreEqual(url, "/panier/courant");
		}

		[Test]
		public void Cart_Clear_Href()
		{
			var ctrl = CreateController<ERPStore.Web.Cart.Controllers.CartController>();

			var url = ctrl.Url.ClearCartHref();

			Assert.AreEqual(url, "/panier/vider");
		}

		// [Test]
		public void Delete_Cart_Item_Href()
		{
			var ctrl = CreateController<ERPStore.Web.Cart.Controllers.CartController>();

			var url = ctrl.Url.DeleteCartItemHref(0);

			Assert.AreEqual(url, "/panier/supprimer/item/0");
		}

	}
}
